package top.ucat.x.system.controller.management;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.ucat.box.cloud.common.result.Result;
import top.ucat.box.cloud.common.result.SystemResult;
import top.ucat.box.starter.mybatis.plus.base.beans.BaseControllerPageListBo;
import top.ucat.box.starter.mybatis.plus.base.beans.PageVo;
import top.ucat.box.starter.mybatis.plus.base.controller.AbstractBaseController;
import top.ucat.x.system.dao.api.SysRoleGroupDao;
import top.ucat.x.system.entity.SysRoleGroup;
import top.ucat.x.system.service.management.SysRoleGroupService;

import java.util.List;


/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Jun
 * @since 2019-06-12
 */
@RestController
@RequestMapping("/sys/role/group")
public class SysRoleGroupController extends AbstractBaseController<SysRoleGroup, SysRoleGroupService> {

    @Autowired
    private SysRoleGroupService sysRoleGroupService;

    @GetMapping("all")
    public Result getAllGroup() {
        List<SysRoleGroup> allGroup = sysRoleGroupService.getAllGroup();
        return SystemResult.OK.getResult(allGroup);
    }

}

